import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.io.IOException;

/**
 * Created by mo.fei on 2015/9/26.
 */
public class FilmDetails {
    public void getDownloadUrl() throws IOException {
        Document doc = Jsoup.connect("http://www.xunleigang.com/thread-279274-1-1.html").get();
        Elements links = doc.select("a[href^=forum.php?mod=attachment&aid=]");
        for (Element link : links) {
            System.out.println("name:"+link.text()+",href:"+link.attr("href"));
        }
    }

    public static void main(String[] args) throws IOException {
        FilmDetails details=new FilmDetails();
        details.getDownloadUrl();
    }
}
